import { defineStore } from 'pinia'

export default defineStore('notice', {
  state: () => {
    return {
      notices: []
    }
  },
  getters: {
    getNotice(state) {
      return state.notices
    }
  },
  actions: {
    addNotice(notice) {
      this.notices.unshift(notice)
    },
    clearNotice() {
      this.notices = []
    }
  }
})
